package cn.good.yan.t6.t1;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

/**
 * 6 数据校验：Validation  - 基于方法演示
 * @author shengren.yan
 * @create 2023-09-14
 */
@Configuration
@ComponentScan("cn.good.yan.t6.t1")
public class ValidationConfig {

    // 1. 创建配置文件类
    @Bean
    public MethodValidationPostProcessor validationPostProcessor() {
        return new MethodValidationPostProcessor();
    }

}
